package com.sykj.why.mongo.enums.exception;



/**
 * @author Mr.will
 * @date 2018/8/3 13:53
 * @Desc 返回数据响应码枚举 公共的异常
 */
public enum ResultEnum {

    //    通用
    UNERROR(9999, "服务器繁忙，请稍后重试！"),
    SUCCESS(10000, "成功"),
    ISBLANK(10001, "入参的对象为空"),
    REPEAT(10002, "名称不能重复"),
    IDISNULL(10003, "ID不能为空"),
    NAMEISNULL(10004, "名称不能为空"),
    OBJISNULL(10006, "操作的信息不存在"),
    HASELEMENT(10007, "请先删除该项下的子元素"),
    PARAMISNULL(10010, "不能为空"),
    TOP_NUM_UPPER_LIMIT(10016, "置顶到达上限"),
    DO_NOT_REPEAT_OPERATIONS(10017, "请勿重复操作！"),
    TIME_IS_INCORRECTLY_FILLED_OUT(10018,"时间填写有误"),

    USER_NOT_EXIST(10021,"用户不存在"),
    USER_ENABLE(10022,"该用户已被禁用"),
    USER_NAME_OR_PASSWORD_WRONG(10023,"用户名或密码错误"),

    USER_OLD_PASSWORD_WRONG(10025,"密码错误"),

    //菜单管理
    MENU_LEVEL_NOT_THREE(10031,"最多支持三级菜单"),

    ;

    private Integer code;
    private String message;

    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
